package com.meilai.project.controller.web.market.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.meilai.project.controller.web.market.dto.*;
import com.meilai.project.controller.web.market.entity.BillMarket;
import com.meilai.project.controller.web.market.vo.BillMarketForADMakeVO;
import com.meilai.project.controller.web.market.vo.BillMarketVO;
import com.meilai.project.controller.web.market.vo.ConfirmBillDetail;
import com.meilai.project.controller.web.market.vo.MarketBillVO;

import java.util.List;

/**
 * <p>
 * 市场单 服务类
 * </p>
 *
 * @author xchen
 * @since 2022-07-16
 */
public interface BillMarketService extends IService<BillMarket> {

    List<BillMarketForADMakeVO> listForADMakeByContractId(Long contractId);

    List<BillMarketForADMakeVO> listForADMakeByCustomerId(Long customerId);

    // 获取列表
    Page<BillMarketVO> selectPageList(BillMarketListDTO searchDTO);

    // 获取详情
    BillMarketVO getOneById(Long id);

    ConfirmBillDetail confirmBillDetail(String id);

    void confirmShootRequirement(Long id);

    void modifyShootRequirement(ShootRequirementDTO req);

    void uploadDesignPic(BillMarketDesignPicDto req);

    String generateConfirmBill(GenerateConfirmBillDto req);

    void signConfirmBill(SignConfirmBillDTO dto);

    // 保存
    boolean save(BillMarketDTO dto);
    // 提交
    boolean begin(BillMarketDTO dto);


    // 通过
    boolean pass(BillMarketCheckDTO dto);

    // 驳回
    boolean returnBack(BillMarketCheckDTO dto);

    // 删除
    boolean delete(Long id);

    // 彻底删除
    boolean actualDelete(Long id);

    boolean save(MarketBillDTO dto);
    // 提交
    boolean begin(MarketBillDTO dto);

    MarketBillVO getSingleOneById(Long id);
    MarketBillVO getSubOneByDetailId(Long marketDetailId);

    Page<MarketBillVO> queryPageList(BillMarketListDTO searchDTO);

    MarketBillVO initSingleOneById(Long saleBillId,Long saleBillDetailId);
}
